<%-- 
    Document   : DetailCar
    Created on : Nov 1, 2011, 11:46:12 PM
    Author     : MrKoi
--%>

<%@page import="DAL.CarBean"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ page session="true" import="java.util.Collection" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>East2West Tours and Travels</title>
        <style>
            .khun
            {
                 width:490px;                 
                 background-color:#f7f6f6;
                 padding:1px 1px 1px 1px;
                 margin-left:auto;
                 margin-right:auto;
                 margin-top:0px;
            }
            .font
            {
            font-family:"Times New Roman", Times, serif;
            font-size:x-large;
            font-weight:bold;
            width:200px;
            margin-left:auto;
            margin-right:auto;
            color:#0707e7;
            }
            .rentalsize
            {
            width:110px;
            }
        </style>
    </head>
    <body>
    <%
        String id="";
        if(request.getParameter("id")!=null)
            {
             id=request.getParameter("id");
             CarBean cb=new CarBean();
             Collection coll=cb.SelectCarID(id);
             request.setAttribute("carb",coll);
            }
    %>
   <!-- <h1>Detail</h1>-->        
            <center>
                <span style="font-size: 20px;color: #343434;">Detail a Car</span></center>                       
    <div class="khun">
        <table border="0" width="490px" >
          <c:forEach items="${carb}" var="cbb">              
              <tr>
                <td width="160" rowspan="9"><img src="${cbb.image}" border="4" alt="" width="120x" height="150px" /></td>
                <td width="111"><strong>Car model: </strong></td>
                <td width="254">${cbb.modelName}</td>
              </tr>
              <tr>
                <td><strong>Car name: </strong></td>
                <td>${cbb.carName}</td>
              </tr>
              <tr>
                <td><strong>Car type: </strong></td>
                <td>${cbb.carType}</td>
              </tr>
              <tr>
                <td><strong>Steats:</strong></td>
                <td>${cbb.seating}</td>
              </tr>
              <tr>
                <td><strong>Air conditioner:</strong> </td>
                <td>${cbb.airConditioner}</td>
              </tr>
              <tr>
                <td><strong>Price package</strong> </td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td><strong>Price/1day:</strong></td>
                <td><f:formatNumber value="${cbb.priceDate}" pattern="$#,###"/></td>
              </tr>
              <tr>
                <td><strong>Price/1hour:</strong></td>
                <td><f:formatNumber value="${cbb.priceHour}" pattern="$#,###"/></td>
              </tr>
              <tr>
                <td><strong>Price/1km:</strong></td>
                <td><f:formatNumber value="${cbb.priceKilomet}" pattern="$#,###"/></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
                <td>
                    <form action="index.jsp?page=CarBook" method="post">
                              <input type="hidden" name="id" value="${cbb.carID}" />
                              <input type="submit" class="rentalsize" value="Rental" />
                          </form>
                </td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td colspan="3"><strong>Description:</strong><br> ${cbb.description}</td>
              </tr>
          </c:forEach>
        </table>
        </div>
    </body>
</html>